/**
 * Created by chenwenxiao on 2016/8/19.
 *
 *  路由参考例子说明
 * '/flowhistory':{     -----------url跳转后显示的内容
    name:'flowhistory',     -----------路由跳转关键字，这里作强制要求，必须与url跳转内容一致
        component: function(resolve){
        require(['./views/glocalme-flowhistory.vue'],resolve);      -----------模块所在位置
    },
    auth: true      -----------模块是否需要路由验证
},
 *
 *
 */
'use strict';

export default function(router) {
    router.map({
        '/': {
            name: 'index',
            component: function (resolve) {
                require(['./views/index.vue'], resolve);
            }
        },
        '/ui': {
            name: 'ui',
            component: function (resolve) {
                require(['./views/UI-lib.vue'], resolve);
            }
        },
        '/about': {
            name: 'about',
            component: function (resolve) {
                require(['./views/page/about.vue'], resolve);
            }
        },
        '/customer': {
            name: 'customer',
            component: function (resolve) {
                require(['./views/page/customer.vue'], resolve);
            }
        },
        '/product': {
            name: 'product',
            component: function (resolve) {
                require(['./views/page/product.vue'], resolve);
            }
        },
        '*': {
            name: 'index',
            component: function (resolve) {
                require(['./views/index.vue'], resolve);
            }
        },
        '/home': {
            name: 'home',
            component: function (resolve) {
                require(['./views/index.vue'], resolve);
            },
            auth: true,
            subRoutes: {
                '/homePage': {
                    name: 'homePage',
                    component: function (resolve) {
                        require(['./views/page/home.vue'], resolve);
                    },
                    auth: true
                }
            }
        }
    })
}
